<extend name="Public/base"/>

<block name="content">

    <style>
      *{margin: 0;padding: 0;}
      .page-container{ margin:20px 50px;}
    </style>


  <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 危险源总体情况   <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
  <div class="page-container">
 <!--   <div class="text-c">
      <form action="" method="get" class="form form-horizontal" id="form-scenery-search">
        &lt;!&ndash; 日期范围：
     <input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
     -
     <input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
      &ndash;&gt;   <input type="text" class="input-text" style="width:250px" placeholder="风险点名称"  name="fxd">
        <button type="submit" class="btn btn-success" name="search"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
      </form>
    </div>-->
    <span class="r">共有：<strong><{$count}></strong> 条数据</span> </div>
  <table class="table table-border table-bordered table-bg">
    <thead>
    <tr>
      <th scope="col" colspan="9">项目列表</th>
    </tr>
    <tr class="text-c">
      <th width="25"><input type="checkbox" name="" value=""></th>
      <th width="40">ID</th>
      <th width="150">风险点</th>
      <th width="150">危险源</th>
      <th width="150">管控等级</th>
      <th width="350">巡查情况</th>

     <!-- <th width="50">详情</th>-->
    </tr>
    </thead>
    <tbody>

    <foreach name="list" item="v">
      <tr class="text-c">
        <td><input type="checkbox" value="1" name=""></td>
        <td><{$v['object_id']}></td>
        <td><{$v['danger_name']}></td>
        <td><{$v['name']}></td>
        <td><{$v['object_level_name']}></td>
        <td>本月已巡检（<{$v['count1']}> ）次; 未巡检（<{$v['count2']}> ）次。<br>
          <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">   【岗位级】巡检（<{$v['yg1']}>）次；未巡检（<{$v['yg2']}>）次。</a> <br>
          <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">   【班组级】巡检（<{$v['bz1']}>）次；未巡检（<{$v['bz2']}>）次。 </a><br>
          <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">   【车间级】巡检（<{$v['cj1']}>）次；未巡检（<{$v['cj2']}>）次。 </a><br>
          <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">   【专业级】巡检（<{$v['zy1']}>）次；未巡检（<{$v['zy2']}>）次。</a><br>
          <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">   【公司级】巡检（<{$v['gs1']}>）次；未巡检（<{$v['gs2']}>）次。</a>
        </td>

    <!--    <td class="td-status">
          &lt;!&ndash;    <if condition="$v['status'] eq 1">&ndash;&gt;
      &lt;!&ndash;    <a href="/index.php/Admin/Search/search_wxy_list/object_id/<{$v['object_id']}>">       <span class="label label-success radius" >详细</span> </a>
      &ndash;&gt;    &lt;!&ndash;  <else />
            <span class="label label-error radius" >禁用</span>
        </if>&ndash;&gt;</td>-->

      </tr>
    </foreach>

    </tbody>
  </table>

  <include file="Public:page" />
  <!--<div style="padding-right: 50px;font-size: 20px">
          <div class="pages"   ><{$page}>  </div>
      </div>-->


  </div>






<!--  <form action="" method="get" class="form form-horizontal" id="form-scenery-search">
    &lt;!&ndash;<div class="text-c"> 日期范围：&ndash;&gt;
      &lt;!&ndash;<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">&ndash;&gt;
      &lt;!&ndash; - &ndash;&gt;
      &lt;!&ndash;<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">&ndash;&gt;
      &lt;!&ndash;<input type="text" class="input-text" style="width:250px" placeholder="输入管理员名称" id="" name="">&ndash;&gt;
      &lt;!&ndash;<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>&ndash;&gt;
    &lt;!&ndash;</div>&ndash;&gt;
  </form>
  &lt;!&ndash; <div id="chart1" class="chart"></div> &ndash;&gt;
  <div style="text-align:center;clear:both;">
  </div>
  <div id="chart2" class="chart"></div>
  <div class="tree well" >
    <ul>
      <foreach name="list" item="v" key="k">
        <li>
            <span class="tree_span" data-id="<{$v[user_id]}>">
              <i class="icon-folder-open"></i>
                <{$v['user_id']}>:
                <if condition="$v['username'] neq null">
                 <{$v['username']}>
                <elseif condition="$v['user_phone'] neq null" />
                    <{$v['user_phone']}>
                </if>
            </span>
        </li>
      </foreach>
    </ul>
  </div>
  <script type="text/javascript">
      var data = [[<{$level1}>],[<{$level2}>],[<{$level3}>],[<{$level4}>],[<{$level5}>]];
      var data_max = 30; //Y轴最大刻度
      var line_title = ["公司级","部门级","车间级","班组级","员工级"]; //曲线名称
      var y_label = ""; //Y轴标题
      var x_label = ""; //X轴标题
      var x = ["所有隐患点","本月共排查隐患点","有隐患","已解决隐患","未解决隐患"]; //定义X轴刻度值
      var title = "本月隐患统计"; //统计图标标题
      // j.jqplot.diagram.base("chart1", data, line_title, "", x, x_label, y_label, data_max, 1);
     j.jqplot.diagram.base("chart2", data, line_title, title, x, x_label, y_label, data_max, 2);

      //ajax 请求树下面的节点
      $('.tree').on('click','.tree_span',function(){
          tmp_span = $(this);
          tmp_span.siblings('ul').toggle();
          if(tmp_span.hasClass('requrst'))
              return false;
          $.ajax({
              type : "get",
              url:"get_next_level?user_id="+tmp_span.data('id'),//+tab,
              //data : $('#'+form).serialize(),// 你的formid
              success: function(data){
                  tmp_span.after(data);
                  tmp_span.addClass('requrst'); // 表示ajax 请求过了 不再请求第二次
              }
          });
      });

  </script>
  -->
</block>
